import React from 'react';

export class Child extends React.Component {
  // constructor() {
  //   super();
  // }

  render() {
    console.log(this.props);
    return (
      <div>
        <h2>子组件</h2>
        <button onClick={() => this.props.giveMoney(100)}>没钱了</button>
      </div>
    );
  }
}

export default Child;
